\(\int \frac {\cos ^3(a+b x^2)}{x} \, dx\) [19]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [C] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 14, antiderivative size = 55 \[ \int \frac {\cos ^3\left (a+b x^2\right )}{x} \, dx=\frac {3}{8} \cos (a) \operatorname {CosIntegral}\left (b x^2\right )+\frac {1}{8} \cos (3 a) \operatorname {CosIntegral}\left (3 b x^2\right )-\frac {3}{8} \sin (a) \text {Si}\left (b x^2\right )-\frac {1}{8} \sin (3 a) \text {Si}\left (3 b x^2\right ) \]

[Out]

3/8*Ci(b*x^2)*cos(a)+1/8*Ci(3*b*x^2)*cos(3*a)-3/8*Si(b*x^2)*sin(a)-1/8*Si(3*b*x^2)*sin(3*a)

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3485, 3459, 3457, 3456} \[ \int \frac {\cos ^3\left (a+b x^2\right )}{x} \, dx=\frac {3}{8} \cos (a) \operatorname {CosIntegral}\left (b x^2\right )+\frac {1}{8} \cos (3 a) \operatorname {CosIntegral}\left (3 b x^2\right )-\frac {3}{8} \sin (a) \text {Si}\left (b x^2\right )-\frac {1}{8} \sin (3 a) \text {Si}\left (3 b x^2\right ) \]

[In]

Int[Cos[a + b*x^2]^3/x,x]

[Out]

(3*Cos[a]*CosIntegral[b*x^2])/8 + (Cos[3*a]*CosIntegral[3*b*x^2])/8 - (3*Sin[a]*SinIntegral[b*x^2])/8 - (Sin[3
*a]*SinIntegral[3*b*x^2])/8

Rule 3456

Int[Sin[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[SinIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3457

Int[Cos[(d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Simp[CosIntegral[d*x^n]/n, x] /; FreeQ[{d, n}, x]

Rule 3459

Int[Cos[(c_) + (d_.)*(x_)^(n_)]/(x_), x_Symbol] :> Dist[Cos[c], Int[Cos[d*x^n]/x, x], x] - Dist[Sin[c], Int[Si
n[d*x^n]/x, x], x] /; FreeQ[{c, d, n}, x]

Rule 3485

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce[(e
*x)^m, (a + b*Cos[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[p, 1] && IGtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {3 \cos \left (a+b x^2\right )}{4 x}+\frac {\cos \left (3 a+3 b x^2\right )}{4 x}\right ) \, dx \\ & = \frac {1}{4} \int \frac {\cos \left (3 a+3 b x^2\right )}{x} \, dx+\frac {3}{4} \int \frac {\cos \left (a+b x^2\right )}{x} \, dx \\ & = \frac {1}{4} (3 \cos (a)) \int \frac {\cos \left (b x^2\right )}{x} \, dx+\frac {1}{4} \cos (3 a) \int \frac {\cos \left (3 b x^2\right )}{x} \, dx-\frac {1}{4} (3 \sin (a)) \int \frac {\sin \left (b x^2\right )}{x} \, dx-\frac {1}{4} \sin (3 a) \int \frac {\sin \left (3 b x^2\right )}{x} \, dx \\ & = \frac {3}{8} \cos (a) \operatorname {CosIntegral}\left (b x^2\right )+\frac {1}{8} \cos (3 a) \operatorname {CosIntegral}\left (3 b x^2\right )-\frac {3}{8} \sin (a) \text {Si}\left (b x^2\right )-\frac {1}{8} \sin (3 a) \text {Si}\left (3 b x^2\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.91 \[ \int \frac {\cos ^3\left (a+b x^2\right )}{x} \, dx=\frac {1}{8} \left (3 \cos (a) \operatorname {CosIntegral}\left (b x^2\right )+\cos (3 a) \operatorname {CosIntegral}\left (3 b x^2\right )-3 \sin (a) \text {Si}\left (b x^2\right )-\sin (3 a) \text {Si}\left (3 b x^2\right )\right ) \]

[In]

Integrate[Cos[a + b*x^2]^3/x,x]

[Out]

(3*Cos[a]*CosIntegral[b*x^2] + Cos[3*a]*CosIntegral[3*b*x^2] - 3*Sin[a]*SinIntegral[b*x^2] - Sin[3*a]*SinInteg
ral[3*b*x^2])/8

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.07 (sec) , antiderivative size = 125, normalized size of antiderivative = 2.27

method result size
risch \(\frac {i {\mathrm e}^{-3 i a} \pi \,\operatorname {csgn}\left (b \,x^{2}\right )}{16}-\frac {i {\mathrm e}^{-3 i a} \operatorname {Si}\left (3 b \,x^{2}\right )}{8}-\frac {{\mathrm e}^{-3 i a} \operatorname {Ei}_{1}\left (-3 i b \,x^{2}\right )}{16}+\frac {3 i {\mathrm e}^{-i a} \pi \,\operatorname {csgn}\left (b \,x^{2}\right )}{16}-\frac {3 i {\mathrm e}^{-i a} \operatorname {Si}\left (b \,x^{2}\right )}{8}-\frac {3 \,{\mathrm e}^{-i a} \operatorname {Ei}_{1}\left (-i b \,x^{2}\right )}{16}-\frac {3 \,{\mathrm e}^{i a} \operatorname {Ei}_{1}\left (-i b \,x^{2}\right )}{16}-\frac {{\mathrm e}^{3 i a} \operatorname {Ei}_{1}\left (-3 i b \,x^{2}\right )}{16}\) \(125\)

[In]

int(cos(b*x^2+a)^3/x,x,method=_RETURNVERBOSE)

[Out]

1/16*I*exp(-3*I*a)*Pi*csgn(b*x^2)-1/8*I*exp(-3*I*a)*Si(3*b*x^2)-1/16*exp(-3*I*a)*Ei(1,-3*I*b*x^2)+3/16*I*exp(-
I*a)*Pi*csgn(b*x^2)-3/8*I*exp(-I*a)*Si(b*x^2)-3/16*exp(-I*a)*Ei(1,-I*b*x^2)-3/16*exp(I*a)*Ei(1,-I*b*x^2)-1/16*
exp(3*I*a)*Ei(1,-3*I*b*x^2)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.85 \[ \int \frac {\cos ^3\left (a+b x^2\right )}{x} \, dx=\frac {1}{8} \, \cos \left (3 \, a\right ) \operatorname {Ci}\left (3 \, b x^{2}\right ) + \frac {3}{8} \, \cos \left (a\right ) \operatorname {Ci}\left (b x^{2}\right ) - \frac {1}{8} \, \sin \left (3 \, a\right ) \operatorname {Si}\left (3 \, b x^{2}\right ) - \frac {3}{8} \, \sin \left (a\right ) \operatorname {Si}\left (b x^{2}\right ) \]

[In]

integrate(cos(b*x^2+a)^3/x,x, algorithm="fricas")

[Out]

1/8*cos(3*a)*cos_integral(3*b*x^2) + 3/8*cos(a)*cos_integral(b*x^2) - 1/8*sin(3*a)*sin_integral(3*b*x^2) - 3/8
*sin(a)*sin_integral(b*x^2)

Sympy [F]

\[ \int \frac {\cos ^3\left (a+b x^2\right )}{x} \, dx=\int \frac {\cos ^{3}{\left (a + b x^{2} \right )}}{x}\, dx \]

[In]

integrate(cos(b*x**2+a)**3/x,x)

[Out]

Integral(cos(a + b*x**2)**3/x, x)

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.40 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.62 \[ \int \frac {\cos ^3\left (a+b x^2\right )}{x} \, dx=\frac {1}{16} \, {\left ({\rm Ei}\left (3 i \, b x^{2}\right ) + {\rm Ei}\left (-3 i \, b x^{2}\right )\right )} \cos \left (3 \, a\right ) + \frac {3}{16} \, {\left ({\rm Ei}\left (i \, b x^{2}\right ) + {\rm Ei}\left (-i \, b x^{2}\right )\right )} \cos \left (a\right ) + \frac {1}{16} \, {\left (i \, {\rm Ei}\left (3 i \, b x^{2}\right ) - i \, {\rm Ei}\left (-3 i \, b x^{2}\right )\right )} \sin \left (3 \, a\right ) - \frac {3}{16} \, {\left (-i \, {\rm Ei}\left (i \, b x^{2}\right ) + i \, {\rm Ei}\left (-i \, b x^{2}\right )\right )} \sin \left (a\right ) \]

[In]

integrate(cos(b*x^2+a)^3/x,x, algorithm="maxima")

[Out]

1/16*(Ei(3*I*b*x^2) + Ei(-3*I*b*x^2))*cos(3*a) + 3/16*(Ei(I*b*x^2) + Ei(-I*b*x^2))*cos(a) + 1/16*(I*Ei(3*I*b*x
^2) - I*Ei(-3*I*b*x^2))*sin(3*a) - 3/16*(-I*Ei(I*b*x^2) + I*Ei(-I*b*x^2))*sin(a)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.85 \[ \int \frac {\cos ^3\left (a+b x^2\right )}{x} \, dx=\frac {1}{8} \, \cos \left (3 \, a\right ) \operatorname {Ci}\left (3 \, b x^{2}\right ) + \frac {3}{8} \, \cos \left (a\right ) \operatorname {Ci}\left (b x^{2}\right ) - \frac {3}{8} \, \sin \left (a\right ) \operatorname {Si}\left (b x^{2}\right ) + \frac {1}{8} \, \sin \left (3 \, a\right ) \operatorname {Si}\left (-3 \, b x^{2}\right ) \]

[In]

integrate(cos(b*x^2+a)^3/x,x, algorithm="giac")

[Out]

1/8*cos(3*a)*cos_integral(3*b*x^2) + 3/8*cos(a)*cos_integral(b*x^2) - 3/8*sin(a)*sin_integral(b*x^2) + 1/8*sin
(3*a)*sin_integral(-3*b*x^2)

Mupad [F(-1)]

Timed out. \[ \int \frac {\cos ^3\left (a+b x^2\right )}{x} \, dx=\int \frac {{\cos \left (b\,x^2+a\right )}^3}{x} \,d x \]

[In]

int(cos(a + b*x^2)^3/x,x)

[Out]

int(cos(a + b*x^2)^3/x, x)